<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改字典数据')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-dict-edit" th:object="${customer}">
			<input name="id"  type="hidden"  th:field="*{id}" />
			<div class="form-group">
				<label class="col-sm-3 control-label">客户类型</label>
				<div class="col-sm-8">
					<select class="form-control" name="type" id="type">
						<option value="">所有</option>
						<option value="收货人" th:field="*{type}">收货人</option>
						<option value="发货人" th:field="*{type}">发货人</option>
					</select>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label is-required">客户名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="name" id="name" th:field="*{name}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">客户邮箱：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="email" id="email" th:field="*{email}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">客户联系方式：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="phone" id="phone" th:field="*{phone}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">地址：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="addressLine1" id="addressLine1" th:field="*{addressLine1}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label is-required">详细地址：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="addressLine2" id="addressLine2" th:field="*{addressLine2}" required>
				</div>
			</div>
		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "business/customer";
	
		$("#form-dict-edit").validate({
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
